package com.bxl.www;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;

/**
 * Created by buxianglong on 17/3/6.
 */
public class MyLogFilter extends Filter<ILoggingEvent> {
    @Override
    public FilterReply decide(ILoggingEvent event) {
        if(event.getMessage().contains("hello world")){
            return FilterReply.DENY;
        }
        return FilterReply.NEUTRAL;
    }
}
